<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class uindex extends CI_Controller {

    var $theme_data = array(
        'layout_main' => 'layout',
        'left' => 'include/leftcp',
    );

    function __construct() {
        parent::__construct();
        $this->load->model("muser");
    }

    public function index() {
        $data = array();
        if ($this->muser->checkLogin()) {
            $this->theme_data["main"] = "user/dashboard";
            $this->template->viewAdmin($this->theme_data, $data);
        } else {
			$this->theme_data["left"] = null;
            $this->theme_data["main"] = "user/login";
            $this->template->viewAdmin($this->theme_data, $data);
        }
    }

}
